package com.xbongbong.paas.pojo.dto;

import com.xbongbong.paas.toolbox.wrap.BaseDTO;
import com.xbongbong.paas.toolbox.wrap.QueryIgnore;
import com.xbongbong.pro.formdata.pojo.SaasSpecialParamPojo;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.PositiveOrZero;

/**
 * @author: wufeng
 * @date: 2018/9/13 9:46
 * @desrcption: 更新返回字段和数据、权限
 */
@Getter
@Setter
@ToString
public class FormDataUpdateGetDTO extends BaseDTO {

    private static final long serialVersionUID = 7217065371055036521L;

    /**
     * 应用id
     */
    @NotNull(message = "{dto.msg.formDataUpdateGet.appId.NotNull}")
    private Long appId;

    @NotNull(message = "{dto.msg.formDataUpdateGet.menuId.NotNull}")
    @Getter(onMethod_ = {@QueryIgnore})
    private Long menuId;

    private Long formId;

    @NotNull(message = "{dto.msg.formDataUpdateGet.dataId.NotNull}")
    private Long dataId;

    /**
     * saas标记
     */
    @Range(min = 1, max = 2, message = "{dto.msg.formDataUpdateGet.saasMark.Range}")
    private Integer saasMark;

    /**
     * 业务类型
     */
    @Getter(onMethod_ = {@QueryIgnore})
    @PositiveOrZero(message = "{dto.msg.formDataUpdateGet.businessType.PositiveOrZero}")
    private Integer businessType;
    /**
     * 子业务类型
     */
    @Getter(onMethod_ = {@QueryIgnore})
    private Integer subBusinessType;

    @Getter(onMethod_ = {@QueryIgnore})
    private SaasSpecialParamPojo saasSpecialParamPojo;

    /**
     * 新版本（报价单专用，用于区分新版本和新建）
     */
    private Boolean newVersionAttr;
    
    private Boolean isCopy = false;
    /**
     * 是否来自外链
     */
    @Getter(onMethod_ = {@QueryIgnore})
    private Integer isOuterLink;

    @Getter(onMethod_ = {@QueryIgnore})
    private Long taskId;
}
